package com.zbf.多线程;

/**
 * @author: LI-CI-GAO
 * 作者: licigao
 * 日期: 2021/8/16  11:03
 * 描述:
 */
public class TestThread001 {

    public static void main(String[] args) throws InterruptedException {

        Thread thread0=new Thread(new Runnable() {
            @Override
            public void run() {
                for (int i= 0;i<10;i++){
                    System.out.println("==0=="+i);
                }
            }
        });
        Thread thread1=new Thread(new Runnable() {
            @Override
            public void run() {
                for (int i= 0;i<10;i++){
                    System.out.println("==1=="+i);
                }
            }
        });
        Thread thread2=new Thread(new Runnable() {
            @Override
            public void run() {
                for (int i= 0;i<10;i++){
                    System.out.println("==2=="+i);
                }
            }
        });
        Thread thread3=new Thread(new Runnable() {
            @Override
            public void run() {
                for (int i= 0;i<10;i++){
                    System.out.println("==3=="+i);
                }
            }
        });

        thread0.start();
        thread1.start();
        thread2.start();
        thread3.start();

        thread0.join();
        thread1.join();
        thread2.join();
        thread3.join();



        System.out.println("=================");


       // Thread.sleep();

       // thread.wait();

       // thread.notify();







    }

}
